/**
 * Created by LIUBA2 on 8/23/2016.
 */
/**
 * 调用方法：
 const JMS=require("../config/jms")
 JMS.send("message to sent")
 *
 */
const Stomp=require("stomp-client");

var config=require("./config.js");

module.exports.send=function(msg){

    var client=new Stomp(config.activeMQIP,config.activeMQPort, "", "");

    client.connect(function(sessionID){

        client.publish(config.destination, msg);

        client.disconnect();
    });
};
